<template>
  <page-body>
    <view class="page">
      <view
        class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex logOutReason_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-stretch justify-between logOutReason_fd0_0'>
          <view class='flex flex-wrap align-center logOutReason_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  logOutReason_fd0_0_c0_c0'>&#xe794;</text>
          </view>
          <view class='flex flex-wrap align-center'>
            <text class='logOutReason_fd0_0_c1_c0'>注销账号</text>
          </view>
          <view class='flex align-center justify-end logOutReason_fd0_0_c2'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---注销账号原因-带图flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch logOutReason_flex_1">
        <view class='flex flex-wrap align-center logOutReason_fd1_0'>
          <image class='logOutReason_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"14.png"'></image>
          <text class='logOutReason_fd1_0_c1'>账号注销</text>
        </view>
        <text class='logOutReason_fd1_1'>永久注销且无法恢复，请谨慎操作</text>
        <view class='flex flex-wrap align-center logOutReason_fd1_2'>
          <text class='logOutReason_fd1_0_c1'>请选择注销账号的原因：</text>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch'>
          <benben-select-diy ref="showSelectPopup1686883023515" class-name='flex flex-direction align-stretch flex'
            :items.sync="dataMessage" v-model="changeId" default-type="aid" default-label="name" :allow-cancel='false'
            type="radio" :disabled='false'>
            <template v-for='(item,key0) in dataMessage'>
              <view v-if="item.isSelected" class='flex align-center flex logOutReason_fd1_3_c0_c0' :key="key0"
                @tap="$refs.showSelectPopup1686883023515.tapHandle(key0)">
                <image class='logOutReason_fd1_3_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"37.png"'></image>
                <text class='logOutReason_fd1_1'>{{item.name}}</text>
              </view>
              <view v-else class='flex align-center flex logOutReason_fd1_3_c0_c0' :key="key0"
                @tap="$refs.showSelectPopup1686883023515.tapHandle(key0)">
                <image class='logOutReason_fd1_3_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"16.png"'></image>
                <text class='logOutReason_fd1_1'>{{item.name}}</text>
              </view>
            </template></benben-select-diy>
        </view>
        <text class='logOutReason_fd1_4'>请填写注销原因</text>
        <view class='flex flex-wrap logOutReason_fd1_5'>
          <textarea class='flex logOutReason_input_fd1_5' confirm-type="done" :placeholder="'请输入'" :maxlength="240"
            placeholder-style="color:#999;font-size:28rpx" v-model="body" />

        </view>
        <button class='flex-sub logOutReason_fd1_6' @tap.stop="goRichFunc()">下一步</button>
      </view>

      <!---注销账号原因-带图flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "changeType": [{
          "name": "多账号，释放手机号",
          "value": "1",
          "image": ""
        }, {
          "name": "不想使用了",
          "value": "2",
          "image": ""
        }, {
          "name": "其他",
          "value": "3",
          "image": ""
        }],
        "changeId": "",
        "dataMessage": [],
        "body": ""
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      this.getReasonFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //跳转风险
      goRichFunc() {
        if (!validate(this.changeId, 'require')) {
          this.$message.info('请选择注销原因');
          return false;
        }
        if (!validate(this.body, 'require')) {
          this.$message.info('请填写注销原因');
          return false;
        }
        this.$urouter.redirectTo(
          `/pages/xtsz/logOutRisk/logOutRisk?cancel_type=${this.changeId}&cancel_reason=${this.body}`);
      },
      //获取注销原因
      async getReasonFunc() {
        //请求方法
        //数据验证

        let datadataMessage = await this.$api.dbGet(global.apiUrls.post637c458b131e3, {

        });
        if (!datadataMessage) return
        if (datadataMessage.data.code != 1) {
          this.$message.info(datadataMessage.data.msg);
          return
        }
        let infodataMessage = datadataMessage.data;
        this.dataMessage = infodataMessage.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #fff;
    background-size: 100% auto;
  }

  .logOutReason_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .logOutReason_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 100rpx;
  }

  .logOutReason_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333333;
    line-height: 50rpx;
  }

  .logOutReason_fd0_0_c0_c0 {
    font-size: 36rpx;
    font-weight: 400;
    color: #333;
  }

  .logOutReason_fd0_0_c0 {
    width: 100rpx;
  }

  .logOutReason_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .logOutReason_flex_1 {
    background: #fff;
    font-size: 32rpx;
    background-size: 100% auto !important;
    padding: 0rpx 32rpx 180rpx 32rpx;
  }

  .logOutReason_fd1_6 {
    background: var(--benbenbgColor2);
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    font-size: 32rpx;
    color: #fff;
    margin: 0rpx 32rpx 0rpx 32rpx;
    height: 88rpx;
    line-height: 88rpx;
    width: 686rpx;
    position: fixed;
    left: 0rpx;
    bottom: calc(40rpx + var(--window-bottom));
  }

  .logOutReason_input_fd1_5 {
    width: 100%;
    height: 80rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }

  .logOutReason_fd1_5 {
    border-bottom: 1px solid rgba(237, 237, 237, 1);
    width: 686rpx;
    border-radius: 10rpx 10rpx 10rpx 10rpx;
    padding: 24rpx 24rpx 24rpx 24rpx;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .logOutReason_fd1_4 {
    border-top: 1px solid #eee;
    line-height: 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: var(--benbenFontColor0);
    padding: 58rpx 0rpx 24rpx 0rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .logOutReason_fd1_3_c0_c0_c0 {
    width: 36rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .logOutReason_fd1_3_c0_c0 {
    padding: 20rpx 0rpx 20rpx 0rpx;
  }

  .logOutReason_fd1_2 {
    border-top: 1px solid rgba(237, 237, 237, 1);
    padding: 32rpx 0rpx 12rpx 0rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .logOutReason_fd1_1 {
    line-height: 40rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .logOutReason_fd1_0_c1 {
    line-height: 45rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: var(--benbenFontColor0);
  }

  .logOutReason_fd1_0_c0 {
    width: 34rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .logOutReason_fd1_0 {
    padding: 32rpx 0rpx 32rpx 0rpx;
  }
</style>
